home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16817 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: goanna.cs.rmit.EDU.AU.!not-for-mail
  2. From: rav@goanna.cs.rmit.edu.au (++           robin)
  3. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  4. Subject: Re: Young programmers read me.
  5. Date: 12 Apr 1996 13:55:34 +1000
  6. Organization: Comp Sci, RMIT, Melbourne, Australia
  7. Message-ID: <4kkk7m$s9k@goanna.cs.rmit.edu.au>
  8. References: <4icpp9$7hr@barad-dur.nas.com> <aidan-0404961557290001@meathook.intac.com> <3165AD94.6F3A@datalytics.com> <j-jahnke-0604960016160001@ntcs-ip8.uchicago.edu> <4keejc$lpi@tpd.dsccc.com>
  9. NNTP-Posting-Host: goanna.cs.rmit.edu.au
  10. NNTP-Posting-User: rav
  11. X-Newsreader: NN version 6.5.0 #0 (NOV)
  12.  
  13. kcline@sun132.spd.dsccc.com (Kevin Cline) writes:
  14.  
  15.     >In article <j-jahnke-0604960016160001@ntcs-ip8.uchicago.edu>,
  16.     >Jerome Jahnke <j-jahnke@uchicago.edu> wrote:
  17.     >>I personally
  18.     >>can't read some styles on C and C++[;] the guys that put the starting brace
  19.     >>on the same line as a conditional or a loop drive me batty and I need to
  20.     >>use CDent to change the code just so I can read it. 
  21.  
  22.     >This should not be a problem if the code is properly indented, ala
  23.  
  24.     >if (something_happened) {
  25.     >  do_something_else();
  26.     >}
  27.  
  28.     >There is something to be said for conserving screen real-estate.
  29.     >I have worked on hard-copy terminals, then on 24x80 screens, then
  30.     >on workstations.  Workstations are better because I can see more code
  31.     >at one time, unless someone wastes all the lines with whitespace and
  32.     >braces.
  33.  
  34.     >>And if you think about it, it is a lot easier to find a BEGIN and END in a
  35.     >>chunk of code than a { and }. They are just bigger and easier to spot.
  36.  
  37.     >If the code follows any reasonable indentation style, BEGIN and END add
  38.     >no information.  They are important to the compiler, but not very important
  39.     >to me, trying to read the code, since they don't do anything.
  40.     >I don't want them to take up a lot of visual space.  
  41.  
  42.     >Would prose be easier to read if the punctuation took more room
  43.     >INTERROGATION  I think not PERIOD
  44.  
  45. ---Telegrams are sent this way, with the period spelled out.
  46. e.g. DROPPING IN TOMORROW STOP WILL YOU BE IN AT SEVEN STOP
  47. The meaning of a message could be completely lost if the
  48. period was dropped during transmission.
  49.  
  50.    So it is with braces; it's easy enough to overlook one.
  51.